from rest_framework import serializers
from .models import ContentModel, Movie, Actor


class ContentModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = ContentModel
        fields = '__all__'


class MovieModelSerializer(serializers.ModelSerializer):

    class Meta:
        model = Movie
        fields = '__all__'


class ActorSerializer(serializers.ModelSerializer):
    class Meta:
        model = Actor
        fields = '__all__'


class ActorModelSerializer(serializers.ModelSerializer):

    movie = MovieModelSerializer(many=True)

    class Meta:
        model = Actor
        fields = '__all__'


class ShowMovieSerializer(serializers.ModelSerializer):

    actor_set = ActorSerializer(many=True)

    class Meta:
        model = Movie
        fields = '__all__'